<template>
	<s-layout title="足迹" navbar="normal" >
		<!-- <assNavbar title="标题" /> -->
		<view class="content">
			<su-sticky>
				<su-tabs  :list="tabsList" :current="state.current" :scrollable="false" lineColor="#3662EC" 
					lineHeight="2rpx" lineWidth="30rpx" itemStyle="height:60rpx" @change="tabsChange" 
					activeStyle="color:#3662EC;font-size:32rpx" inactiveStyle="color:#000000;font-size:32rpx"/>
			</su-sticky>
			
			<goodsLog v-if="state.current == 0"/>
			<shopLog v-if="state.current == 1"/>
			<assLog v-if="state.current == 2"/>
			
			<!-- 推荐列表 -->
			<recommend />
		</view>
	</s-layout>
</template>

<script setup>
	import sheep from '@/sheep';
	import {ref, reactive, computed ,nextTick    } from 'vue'
	import { onLoad, onShow, onHide ,onPullDownRefresh ,onReachBottom} from '@dcloudio/uni-app';
	import assNavbar from '@/components/ass-navbar.vue';
	import recommend from "./components/recommend.vue"
	import goodsLog from "./components/goods-log.vue"
	import shopLog from "./components/shop-log.vue"
	import assLog from "./components/ass-log.vue"
	const tabsList= [
		{name:'商品',type:'goods'},
		{name:'店铺',type:'shop'},
		// {name:'社群',type:'association'},
	]
	const state = reactive({
		current:0,
		currentType:'goods',
		list:[],
		data:{},
	})
	onLoad((opt)=>{

	})
	onReachBottom(()=>{})
	onPullDownRefresh(()=>{
		setTimeout(()=>{
			uni.stopPullDownRefresh()
		})
	})
	function tabsChange({index,type}){
		state.current = index
		state.currentType = type
		uni.pageScrollTo({
			scrollTop:0,
			duration:200,
		})
	}
	function onClick(){
		sheep.$router.go('/pages/index/index')
	}
	
</script>

<style lang="scss" scoped>
	.content{
		
	}
</style>